import React from 'react'
import styles from './index.less'

type proGressType = {
  showText: Boolean;
  percent: number;
};

export default function ProGress(props:proGressType) {
  return (
    <div className={styles.conProGress}>
        <div className={styles.proGress}>
            <div className={styles.percent} style={{'width':props.percent+'%'}}></div>
        </div>
        {
          props.showText?<div className={styles.text}>{props.percent>100?100:props.percent}%</div>:''
        }
    </div>
  )
}
